<html><head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>OpenPreferences</title></head>
<body bgcolor="#FFFFDF" link="#009999" vlink="#006666" alink="#006666">
<font face="Arial" size="2"><p align="center"><b><font size="4">OpenPreferences()</font></b></p>
<p><b>Syntax</b></p><blockquote>

Result = <font color="#006666"><b>OpenPreferences</b></font>(Filename$ [, Flags])</blockquote>

</blockquote>
<b>Description</b><br><blockquote>



Opens a previously existing preference file. 

 

</blockquote><p><b>Parameters</b></p><blockquote>
<style type="text/css">
table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }
table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }
</style>
<table width="90%" class="parameters">
<tr><td width="10%"><i>Filename$</i></td>
<td width="90%"> 
 
The filename of the preference file. 

 

</td></tr>
<tr><td><i>Flags (optional)</i></td>
<td> 
 
It can be a combination of the following values: 
 
<pre><font face="Courier New, Courier, mono"size="2">  <font color="#924B72">#PB_Preference_NoSpace</font>: no spaces will be put around the equal sign joining key and values.
                          It can be useful when dealing with external preferences files which doesn't
                          accept spaces around equal sign.
  <font color="#924B72">#PB_Preference_GroupSeparator</font>: add an empty line between the groups to ease readability of the file.
</font></pre>

</td></tr>
</table>
</blockquote><p><b>Return value</b></p><blockquote>



Nonzero if the file has been successfully opened, zero otherwise. 

 

</blockquote><p><b>Remarks</b></p><blockquote>



If the file wasn't found or can't be opened, it is still possible to use the read functions and it 
will return the specified default value. It is very useful to initialize in one step the program variables. 
The functions like <a href="readpreferencestring.html">ReadPreferenceString()</a> can be used to read the preference values stored in the file. 
<br>
<br>
To remove a key or a group, use <a href="removepreferencekey.html">RemovePreferenceKey()</a> and <a href="removepreferencegroup.html">RemovePreferenceGroup()</a>. 
To create or change the current group, use <a href="preferencegroup.html">PreferenceGroup()</a>. 
<br>
<br>
It is possible to change existing values with <a href="writepreferencestring.html">WritePreferenceString()</a> and similar functions. 
<br>
<br>
Once all write operations are done, <a href="closepreferences.html">ClosePreferences()</a> needs to be called to really write the preferences back to disk 
(if it has been modified inbetween). 

 

</blockquote><p><b>See Also</b></p><blockquote>

<a href="closepreferences.html">ClosePreferences()</a> 

</Blockquote><p><b>Supported OS  </b><Blockquote>All</Blockquote></p><center>&lt;- <a href=nextpreferencekey.html>NextPreferenceKey()</a> - <a href=index.html>Preference Index</a> - <a href=preferencecomment.html>PreferenceComment()</a> -&gt;



</body></html>